from django.urls import path, re_path, include
from api import views

urlpatterns = [
    # 登录
    path('login/', views.LoginAPIView.as_view()),
    # 手机短信码发送
    path('sms/code/', views.SmsCodeAPIView.as_view()),
    # topic
    path('topic/', views.TopicListAPIView.as_view()),
    # 临时密钥
    path('moment/', views.MomentAPIView.as_view()),
    # 发布页面保存
    # path('publish/data/', views.PublishDataAPIView2.as_view()),
    path('publish/data2/', views.PublishDataAPIView2.as_view()),
    # 首页内容
    path('index/data/', views.IndexDataListAPIView.as_view()),

    # 首页详情页
    re_path(r'index/detail/(?P<pk>\d+)/', views.IndexDetailRetrieveAPIView.as_view()),
    # 获取更多评论
    path('comment/', views.CommentAPIView.as_view()),
    # 新闻点赞
    path('thumbs/up/', views.ThumbsAPIView.as_view()),
    # 拍卖列表
    path('auction/list/', views.AuctionDataView.as_view()),
    # 单个拍卖场详细
    re_path(r'auction/(?P<pk>\d+)/$', views.AuctionDetailView.as_view()),
    # 单个拍品详细
    re_path(r'auction/item/(?P<pk>\d+)/$', views.AuctionItemDetailView.as_view()),
    # 保证金
    re_path(r'auction/deposit/(?P<pk>\d+)/$', views.AuctionDepositView.as_view()),
    # 竞价
    re_path('auction/item/bid/', views.AuctionBidView.as_view()),
    # 优惠劵列表
    path('auction/coupon/list/', views.CouponListView.as_view()),
    # 优惠劵领取
    path('auction/coupon/apply/', views.CouponApplyView.as_view()),
    # 自己的优惠劵显示
    path('auction/coupon/user/', views.CouponUserView.as_view()),
    # 订单列表
    path('auction/order/list/', views.OrderView.as_view()),
    # 订单详细列表
    re_path(r'auction/order/detail/(?P<pk>\d+)/$', views.OrderDetailView.as_view()),
]
